#include <stdio.h>
#include <unistd.h>

int main(){
	pid_t fpid;
	printf("Forking......\n");
	fpid = fork();

	if (fpid < 0) {
		printf("Error in fork!\n");
	} else if (fpid = 0) {
		printf("This is a child process, pid=%d\n",getpid());
	} else {
		printf("This is a parent process, pid=%d\n",getpid());
	}
	return 0;
}
